package com.github.maojx0630.easy.translate.translate;


import cn.hutool.core.util.TypeUtil;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.util.List;

/**
 * @author 毛家兴
 * @since 2024-06-19 12:00
 */
public interface TranslateHandle<A extends Annotation> {

  Object getTranslateValue(A ann, String value, Field field);

  List<String> getTranslateField(A ann, String value, Field field);

  default Integer getSort() {
    return 0;
  }

  default Class<A> getAnnClass(){
    return (Class<A>) TypeUtil.getTypeArgument(this.getClass());
  }
}
